/*
 * Author: http://www.redwolf-soft.com
 * All Rights Reserved
 * 
 * 2013.11
 *   
 * */

package com.redwolfsoft.libshoppingserver.brand;


import net.sf.json.JSONObject;



public class BrandAuthorizedShopInfo {
	public final static String TAG = "BrandAuthorizedShopInfo";
	public String name = null;
	public String url = null;
	
	public BrandAuthorizedShopInfo(String name,String url )
	{
		this.name = name;
		this.url = url;
	}
	
	public BrandAuthorizedShopInfo(JSONObject obj)
	{
		if(obj==null)
		{
			//Log.w(TAG, "JSONObject is null");
			return;
		}
		//try {			
			name = obj.getString("name");			
			url = obj.getString("url");			
			
		/*} catch (JSONException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}*/
	}
	
	public JSONObject toJsonObject()
	{
		JSONObject obj = new JSONObject();
		//JSONObject obj2 = new JSONObject();
	
		obj.put("name", name);
		obj.put("url", url);		
		
		//obj2.put(TAG, obj);
		
		return obj;
		
	}
}
